import Vue from 'vue'
import VueRouter from 'vue-router'

// eslint-disable-next-line no-unused-vars
import Login from '../components/Login.vue'
import Welcome from "../components/Welcome.vue";
import Home from "../components/Home.vue";
import Users from "../components/user/Users.vue";
import Rights from "../components/power/Rights.vue";
import Roles from "../components/power/Roles.vue";
import Cate from "../components/goods/Cate.vue";
import params from "../components/goods/params.vue";
import List from "@/components/goods/List";
import Add from "@/components/goods/Add.vue";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/home',
    // eslint-disable-next-line no-undef
    component: Home,
    redirect: '/welcome',
    children: [
      // eslint-disable-next-line no-undef
      { path: '/welcome', component: Welcome },
      { path: '/Users', component: Users },
      { path: '/rights', component: Rights },
      { path: '/Roles', component: Roles },
      { path: '/categories', component: Cate },
      { path: '/params', component: params },
      { path: '/goods', component:  List },
      { path: '/goods/add', component:  Add },
    ]
  }


]

const router = new VueRouter({
  routes
})

export default router
